/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package database;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

/**
 *
 * @author Alumno
 */
public class AccesoDB {

    public AccesoDB() {
    }
    
    public static Connection getConnection() throws Exception, SQLException{
        Connection cn;
        Class.forName("oracle.jdbc.OracleDriver").newInstance();
        String url = "jdbc:oracle:thin:@localhost:1521:XE";
        cn = DriverManager.getConnection(url, "hr", "hr");
        return cn;
    }
}
